<template>
	<div class="wode">
    <div>
    	<div class="flexc yy">
    		<div>
    			<img :src="person.avatar" style="width: 1rem; height: 1rem; border-radius: 0.5rem;">
    		</div>
    		<div style="margin-left: 0.3rem; font-size: 0.3rem; font-weight: bold;">
    			{{person.name}}
    		</div>
    		<div style="margin-left: 0.3rem; background: #EAEAEE; line-height: 0.6rem; padding: 0 0.2rem; border-radius: 0.3rem;">
    			{{person.title}}
    		</div>
    	</div>

    		<div class="flexbc" style="margin-bottom: 0.2rem;">
    			<div style="flex: 1; padding: 0.2rem; border: 1px #EAEAEA solid; border-radius: 0.1rem;" class="flexc">
    				<div><img src="../../../img/22.png" style="width: 0.8rem; border-radius: 0.4rem;"></div>
    				<div style="margin-left: 0.2rem;">
    					<div style="margin-bottom: 0.1rem; font-size: 0.25rem;">客户数</div>
    					<div style="font-weight: bold; color: #999; font-size: 0.22rem;">共计{{shujuall.khs}}个</div>
    				</div>
    			</div>
    			<div style="flex: 1; padding: 0.2rem; border: 1px #EAEAEA solid; border-radius: 0.1rem; margin-left: 0.2rem;" class="flexc">
    				<div><img src="../../../img/2.png" style="width: 0.8rem; border-radius: 0.4rem;"></div>
    				<div style="margin-left: 0.2rem;">
    					<div style="margin-bottom: 0.1rem; font-size: 0.25rem;">联系人数</div>
    					<div style="font-weight: bold; color: #999; font-size: 0.22rem;">{{shujuall.lxrs}}个</div>
    				</div>
    			</div>
    		</div>
    		<div class="flexbc" style="margin-bottom: 0.2rem;">
    			<div style="flex: 1; padding: 0.2rem; border: 1px #EAEAEA solid; border-radius: 0.1rem;" class="flexc">
    				<div><img src="../../../img/4.png" style="width: 0.8rem; border-radius: 0.4rem;"></div>
    				<div style="margin-left: 0.2rem;">
    					<div style="margin-bottom: 0.1rem;font-size: 0.25rem;">拜访数</div>
    					<div style="font-weight: bold; color: #999; font-size: 0.22rem;">{{shujuall.bfs}}个</div>
    				</div>
    			</div>
    			<div style="flex: 1; padding: 0.2rem; border: 1px #EAEAEA solid; border-radius: 0.1rem; margin-left: 0.2rem;" class="flexc">
    				<div><img src="../../../img/1.png" style="width: 0.8rem; border-radius: 0.4rem;"></div>
    				<div style="margin-left: 0.2rem;">
    					<div style="margin-bottom: 0.1rem;font-size: 0.25rem;">公海客户数</div>
    					<div style="font-weight: bold; color: #999; font-size: 0.22rem;">{{shujuall.ghkhs}}个</div>
    				</div>
    			</div>
    		</div>

    		<div style=" padding: 0.2rem; border: 1px #EAEAEA solid; border-radius: 0.1rem; margin-bottom: 0.2rem;" class="flexbc"  @click="go('/xiaoxi')">
          <div class="flexbc">
            <div><img src="../../../static/img/666.png" style="width: 0.8rem; border-radius: 0.4rem;"></div>
            <div style="margin-left: 0.2rem;">
            	<div style="margin-bottom: 0.1rem;font-size: 0.25rem;">通知消息</div>
            	<div style="font-weight: bold; color: #999; font-size: 0.22rem;" v-if="shujuall.tzxxs == 0">暂无通知消息</div>
              <div  style="font-weight: bold; color: #999; font-size: 0.22rem;" v-if="shujuall.tzxxs != 0">您有<span style="color: #f00; font-weight: bolid;">{{shujuall.tzxxs}}</span>条通知消息</div>
            </div>
          </div>

    			<div><img src="../../../static/img/888.png" style="width: 0.6rem;"></div>
    		</div>
    		<div style=" padding: 0.2rem; border: 1px #EAEAEA solid; border-radius: 0.1rem;" class="flexbc"  v-if="person.title == '销售内勤'"  @click="go('/shenpi')">
          <div class="flexbc">
            <div><img src="../../../static/img/777.png" style="width: 0.8rem; border-radius: 0.4rem;"></div>
            <div style="margin-left: 0.2rem;">
            	<div style="margin-bottom: 0.1rem;font-size: 0.25rem;">审批消息</div>
            	<div style="font-weight: bold; color: #999; font-size: 0.22rem;" v-if="shujuall.spxxs == 0">暂无审批消息</div>
              <div  style="font-weight: bold; color: #999; font-size: 0.22rem;" v-if="shujuall.tzxxs != 0">您有<span style="color: #f00; font-weight: bolid;">{{shujuall.spxxs}}</span>条审批消息</div>
            </div>
          </div>

    			<div><img src="../../../static/img/888.png" style="width: 0.6rem;"></div>
    		</div>
    </div>
    <dibu></dibu>
	</div>
</template>

<script>
  import dibu from '../zujian/dibu.vue'
  var h = document.documentElement.clientWidth / 7.5 + 'px';
      document.documentElement.style.fontSize = h;
	export default {
		name: 'gongzuotai',
    components:{
      dibu
    },
		data() {
			return {
        person:{
          avatar: "https://static-legacy.dingtalk.com/media/lQDPDhvWJJzMncjNAdPNAdOwDtoK89KpAuMDL4ZuTQByAA_467_467.jpg",
          boss: false,
          job_number: null,
          manager_userid: null,
          mobile: "15553523723",
          name: "林鹏举",
          remark: null,
          title: null,
          unionid: "afKiSpGaXnapU1dDqAeRKowiEiE",
          userid: "063523235026761126"
        },
        all:{
          fzrid: "063523235026761126"
        },
        list:"",
        n1:0,//拜访审批通知
        n2:0,//客户审批通知
        shujuall:""
			}
		},
		created() {

      this.person = JSON.parse(localStorage.getItem('person'))

      axios.get('/Common/queryAllEventCount',{params:this.all}).then((response)=>{
        if (response.data.state == 200) {
          this.shujuall = response.data.data
        } else {
          vant.Toast(response.data.msg);
        }
      })

		},
		mounted() {

		},
		methods: {

		}
	}
</script>


<style scoped  lang="less">

  .wode {
    background: #fff;
    min-height: 100vh;
    width: 100vw;
    padding: 0.3rem;
    font-size: 0.25rem;

    img {
      max-width: 100%;
      display: block;
    }

    .flex {
      display: flex;
    }

    .flexc {
      display: flex;
      align-items: center;
    }

    .flexbc {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .flexcc {
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .yy {
      box-shadow: 0 0 0.1rem #eaeaea;
      padding: 0.2rem 0.3rem;
      margin-bottom: 0.3rem;
    }

    .act {
      background: #ccc !important;
      color: #FFFFFF;
      padding: 0.1rem 0.2rem;
      border-radius: 0.1rem;
    }

    .act1 {
      background: #fff;
      box-shadow: 0 0 0.1rem #eaeaea;
      padding: 0.1rem 0.2rem;
      margin-left: 0.2rem;
      border-radius: 0.1rem;
    }
  }
</style>
